<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/page/inc/taglib.jsp"%>
<div class="pageHeader">
	<form id="pagerForm" onsubmit="return navTabSearch(this);" action="${pageContext.request.contextPath}/investment/customer/list" method="post">
		<!-- 分页表单参数 -->
		<%@include file="/WEB-INF/page/inc/pageForm.jsp"%>
		<div class="searchBar">
			<table class="searchContent">
				<tr>
					<td>
						<td>客户手机：<input type="text" name="phone" class="phone" value="${requestScope.dwzPageBean.countResultMap.phone}" placeholder="输入客户手机号码" />
					</td>
				</tr>
			</table>
			<div class="subBar">
				<ul>
					<li>
						 <div class="buttonActive">
							<div class="buttonContent">
								<button type="submit">查询</button>
							</div>
						</div> 
					</li>
				</ul>
			</div>
		</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<!-- 添加	 -->
			<li>
				<shiro:hasPermission name="/investment/customer/toInsert">
					<a class="add" href="${pageContext.request.contextPath}/investment/customer/toInsert" rel="insert" target="dialog" width="820" height="460" mask="true"><span>添加</span></a>
				</shiro:hasPermission>
			</li>
			<li>
				<shiro:hasPermission name="/investment/customer/delete">
					<a class="delete" href="${pageContext.request.contextPath}/investment/customer/delete" rel="id" target="selectedTodo" title="确定要删除吗？" warn="请最小选择一条记录" mask="true"><span>批量删除</span></a>
				</shiro:hasPermission>
			</li>
			<li>
				<shiro:hasPermission name="/investment/customer/excel">
					<a class="icon" href="${pageContext.request.contextPath}/investment/customer/excel" target="dwzExport" targettype="navTab" title="实要导出这些记录吗?"><span>导出EXCEL</span></a>
				</shiro:hasPermission>
			</li>
			<li>
				<shiro:hasPermission name="/investment/customer/toImportExcel">
					<a class="icon" href="${pageContext.request.contextPath}/investment/customer/toImportExcel" rel="importExcel" target="dialog" targettype="dialog" title="导入Excel"><span>导入EXCEL</span></a>
				</shiro:hasPermission>
			</li>
			<li>
				<shiro:hasPermission name="/investment/handover/list">
					<a class="delete" width="850" height="450"  href="${pageContext.request.contextPath}/investment/handover/list" rel="handoverList" target="dialog" targettype="dialog" title="审核"><span>审核</span></a>
				</shiro:hasPermission>
			</li>
		</ul>
	</div>
	<div>
		
	</div>
	<table class="table" targetType="navTab" asc="asc" desc="desc" width="100%" layoutH="138">
		<thead>
			<tr>
				<th width="22"><input type="checkbox" group="id" class="checkboxCtrl"></th>
				<th >客户姓名</th>
				<th >时间</th>
				<th>电话</th>
				<th >地址</th>
				<th >性别</th>
				<th >跟进人</th>
				<th >客户状态</th>
				<th >最后跟进时间</th>
				<th >招商类型</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
			<c:if test="${requestScope.dwzPageBean != null &&  requestScope.dwzPageBean.recordList != null }">
				<c:forEach var="record" items="${requestScope.dwzPageBean.recordList}" varStatus="status">
					<tr ondblclick="openDetails(this)" target="dialog" href="${pageContext.request.contextPath}/investment/customer/toUpdate?id=${record.id}" title="编辑">
						<td><input name="id" value="${record.id}" type="checkbox"></td>
						<td>${record.name}</td>
						<td><fmt:formatDate value="${record.time}" pattern="yyyy-MM-dd" /></td>
						<td>${record.phone}</td>
						<td>${record.areaName}</td>
						<td>${record.sex==1 ? '男':'女'}</td>
						<td>${record.mename}</td>
						<td>${record.state==1?'未联系':'跟进中'}</td>
						<td><fmt:formatDate value="${record.fwtm}" pattern="yyyy-MM-dd" /></td>
						<td>${record.type}</td>
						<td>
							<shiro:hasPermission name="/investment/invfollow/list">
							<!-- 招商记录跟进	 -->
								<a title="招商记录跟进" target="dialog" rel="invFollow" href="${pageContext.request.contextPath}/investment/invfollow/list?id=${record.id}" mask="true"class="deleteBtn"><span>跟进记录</span></a>
							</shiro:hasPermission>
							
							<shiro:hasPermission name="/investment/customer/toUpdate">
							<!-- 编辑	 -->
								<a title="编辑" target="dialog" width="820" height="460" href="${pageContext.request.contextPath}/investment/customer/toUpdate?id=${record.id}" mask="true" class="editBtn"><span>编辑</span></a> 
							</shiro:hasPermission>
							
							<shiro:hasPermission name="/investment/customer/delete">
							<!-- 删除	 -->
								<a title="确定要删除吗？" target="ajaxTodo" href="${pageContext.request.contextPath}/investment/customer/delete?id=${record.id}" mask="true"class="deleteBtn"><span>删除</span></a>
							</shiro:hasPermission>
							<shiro:hasPermission name="/investment/customer/delete">
							<!-- 签约 -->
								<a title="签约合同" target="dialog" href="${pageContext.request.contextPath}/investment/handover/toInsert?id=${record.id}" mask="true"class="editBtn"><span>签约</span></a>
							</shiro:hasPermission>
						</td>
					</tr>
				</c:forEach>
			</c:if>
		</tbody>
	</table>
	<!-- 分页条 -->
	<%@include file="/WEB-INF/page/inc/pageBar.jsp"%>
</div>
<script type="text/javascript" src="${pageContext.request.contextPath}/statics/ztree/js/jquery.ztree.core.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/statics/ztree/js/jquery.ztree.excheck.js"></script>
 <script>
 </script>